package com.css.fxfzdzzh.modules.grid.controller;

import com.css.fxfzdzzh.modules.grid.service.GridService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;

/**
 * @Description: fxfzdzzh
 * @Author: lhl
 * @CreateDate: 2023/3/13 14:28
 */
@RestController
@RequestMapping("/sys/grid")
public class GridController {
    @Resource
    GridService gridService;

    @PostMapping("/getGridByGeom")
    public void getGridByGeom(String names, String codes, String kilometer) {
        try {
            gridService.getGridByGeom(Arrays.asList(names.split(",")),Arrays.asList(codes.split(",")),kilometer);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
